<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
class Config_model extends AppModel{
    var $_tablename = PARAMETER;
    var $_primary_key = PARAMETER_PARAM_ID;
    function Config_model(){
        parent::AppModel();
        $CI = &get_instance();
        $CI->load->module_define('FRONT.configurations');
    }
    
    function get_config($key){
        $this->db->where(PARAMETER_NAME, $key);
        return $this->db->get($this->_tablename)->row();
    }
    
    function get_lists($key){
        $cond = array(PARAMETER_TYPE => 'LIST',
                      PARAMETER_NAME => $key,
                      );
        return parent::get_lists($cond, NULL, NULL, PARAMETER_PARAM_ID);
    }
}
?>
